package com.bifang.core.dao.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 系统参数表
 *
 * @author chenzh
 * @since 2020-06-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SYS_DICT")
@ApiModel(value = "SysDict对象", description = "系统参数表")
// @KeySequence(value = "SQ_SYS_ID", clazz = Long.class)
public class SysDict extends Model<SysDict> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "SYS_ID", type = IdType.AUTO)
    private Long sysId;

    @ApiModelProperty(value = "所属字段")
    @TableField("DICT_FIELD")
    private String dictField;

    @ApiModelProperty(value = "字段中文")
    @TableField("FIELD_NAME")
    private String fieldName;

    @ApiModelProperty(value = "属性")
    @TableField("DICT_KEY")
    private String dictKey;

    @ApiModelProperty(value = "属性值")
    @TableField("DICT_VALUE")
    private String dictValue;

    @ApiModelProperty(value = "属性父类")
    @TableField("PARENT_KEY")
    private String parentKey;

    @ApiModelProperty(value = "是否有效 0 禁用 1 启用")
    @TableField("`STATUS`")
    private String status;

    @ApiModelProperty(value = "是否可编辑 0 否 1 是")
    @TableField("FIXED")
    private String fixed;

    @ApiModelProperty(value = "备注")
    @TableField("REMARKS")
    private String remarks;

    @ApiModelProperty(value = "排序")
    @TableField("ORDER_NO")
    private Integer orderNo;

    @ApiModelProperty(value = "图标")
    @TableField("ICON")
    private String icon;

    @ApiModelProperty(value = "分类")
    @TableField("CLASSIFY")
    private String classify;

    @ApiModelProperty(value = "父字段")
    @TableField("PARENT_FIELD")
    private String parentField;

    @ApiModelProperty(value = "级别")
    @TableField("RATE")
    private Integer rate;

    @ApiModelProperty(value = "所属组织编码")
    @TableField("ORG_NUMBER")
    private String orgNumber;

    @ApiModelProperty(value = "创建人")
    @TableField(
            value = "CREATE_NAME",
            fill = FieldFill.INSERT,
            updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @ApiModelProperty(value = "创建时间")
    @TableField(
            value = "CREATE_TIME",
            fill = FieldFill.INSERT,
            updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @ApiModelProperty(value = "修改人")
    @TableField(
            value = "UPDATE_NAME",
            fill = FieldFill.INSERT_UPDATE,
            updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @ApiModelProperty(value = "更新时间")
    @TableField(
            value = "UPDATE_TIME",
            fill = FieldFill.INSERT_UPDATE,
            updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @ApiModelProperty(value = "逻辑删除标志 0 正常 1 删除")
    @TableField(value = "DEL", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.sysId;
    }
}
